<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/13
  Time: 11:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>登录成功</title>
</head>
<body>

<a href="${pageContext.request.contextPath}/user/logout">退出</a>
<hr>
<h1>登录成功！！！！！</h1>welcome ：<shiro:principal/>
<hr>
<ol>
    <c:forEach items="${products}" var="product">
        <li>${product}</li>
    </c:forEach>
</ol>

<hr>
<shiro:hasAnyRoles name="teacher,manager">
    <a href="${pageContext.request.contextPath}/teacher/findAll">教师管理</a> <br>
</shiro:hasAnyRoles>
<shiro:hasRole name="student">
    <a href="${pageContext.request.contextPath}/student/findAll">学生管理</a>
</shiro:hasRole>
</body>
</html>
